﻿using UnityEngine;

[System.Serializable]
public class UpgradesSave : ISaveObject
{
    [SerializeField] UpgradeSavableObject[] upgradeSaves;
    public UpgradeSavableObject[] UpgradeSaves => upgradeSaves;

    public UpgradesSave()
    {
        upgradeSaves = null;
    }

    public UpgradesSave(BaseUpgrade[] upgrades)
    {
        upgradeSaves = new UpgradeSavableObject[upgrades.Length];
        for (int i = 0; i < upgrades.Length; i++)
        {
            upgradeSaves[i] = upgrades[i].Save();
        }
    }
}
